

<template>
    <ul class="todo-main">
      <!-- 需要key -->
      <Item v-for="todo in todos" 
        :key="todo.id" v-bind="todo"
        :deleteData="deleteData" 
        :singleCheckHandle="singleCheckHandle" />
    </ul>
</template>

<script>
import Item from './Item'


export default {
  name: "List",
  props:["todos","deleteData","singleCheckHandle"],
  components:{Item},
  mounted(){
    // console.log("todos",this);
  }
};
</script>

<style scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>